package lab02.test11;

public class Rectangle implements Printx {


    double width;
    double high;
    double perimeter;
    double area;


    public double Width() {
        return width;
    }

    public double High() {
        return high;
    }



    public double perimeter() {
        double perimeter = 2 * (width + high);
        return perimeter;
    }

    public double area() {
        double area = width * high;
        return area;
    }


    @Override

    public void printMyWay() {
        System.out.println("矩形长为：" + high + " 矩形宽为：" + width);
        System.out.println("矩形周长为：" + perimeter());
        System.out.println("矩形面积为：" + area());

    }

}
